<%@page import="systems.AdsSystem"%>
<%@page import="java.util.TreeMap"%>
<%@page import="helpers.UrlHelper"%>
<%@page import="java.util.ArrayList"%>
<%
TreeMap check = (TreeMap) request.getAttribute("check");
TreeMap values = (TreeMap) request.getAttribute("values");
String success = (String) request.getAttribute("success");

//Set content for Seo
String title = "Contact Us - " + UrlHelper.getDomainServer(request);
String description = "If you have any questions, or comments and suggestions, please use the form below to contact us.";
String keywords = "contact, contact us, check safe site, check safe, safe site, check antivirus, check google safe browsing, check wot, check web of trust, mcaffee site advisor check, norton safeweb check, malware scanner online, free tool safety";
String url = UrlHelper.getServerUrl(request) + "/contact";
%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<jsp:include page="/layouts/header.jsp">
	<jsp:param name="title" value="<%=title %>" />
    <jsp:param name="description" value="<%=description %>" />
    <jsp:param name="keywords" value="<%=keywords %>" />
    <jsp:param name="ogtitle" value="<%=title %>" />
    <jsp:param name="ogurl" value="<%=url %>" />
    <jsp:param name="ogdescription" value="<%=description%>" />
</jsp:include>
		<br />
		<div class="row-fluid">
			<div class="span8">
				<div class="row-fluid section-header">
	    			<h2>Contact Us</h2>
	    		</div>
				
				<div class="contact-form">
					<% if (success != null) { %>
					<div class="alert alert-success">
						<button type="button" class="close" data-dismiss="alert">&times;</button>
					  	<%=success %>
					</div>
					<% } %>
					<p>We would love to hear from you, please use the contact form below to send us an email or alternatively contact us on one of the other methods below: </p>
					
					<form method="post">
						<div class="row-fluid">
							<div class="span6">
								<div class="control-group <%=check.get("name") != null ? "error" : "" %>">
									<label>Your name</label>
				                    <input type="text" placeholder="" class="span12" name="name" data-original-title="" value="<%=values.get("name") != null ? values.get("name") : "" %>">
				                    <% if (check.get("name") != null ) { %>
				                    <span class="help-inline"><%=check.get("name") %></span>
				                    <% } %>
			                    </div>
			               	</div>
			               	<div class="span6">
			               		<div class="control-group <%=check.get("email") != null ? "error" : "" %>">
				                    <label>Your email address</label>
				                    <input type="text" placeholder="" class="span12 email" name="email" value="<%=values.get("email") != null ? values.get("email") : "" %>" data-original-title="">
				                    <% if (check.get("email") != null ) { %>
				                    <span class="help-inline"><%=check.get("email") %></span>
				                    <% } %>
			                    </div>
			               	</div>
			             </div>
			             <div class="row-fluid">
			             	<div class="span12">
								<div class="control-group <%=check.get("title") != null ? "error" : "" %>">
									<label>Message Title</label>
				                    <input type="text" placeholder="" class="span12" name="title" value="<%=values.get("title") != null ? values.get("title") : "" %>" data-original-title="">
				                    <% if (check.get("title") != null ) { %>
				                    <span class="help-inline"><%=check.get("title") %></span>
				                    <% } %>
				                </div>
								
								<div class="control-group <%=check.get("content") != null ? "error" : "" %>">
									<label>Message Content</label>
				                    <textarea placeholder="" rows="7" name="content" class="span12" data-original-title=""><%=values.get("content") != null ? values.get("content") : "" %></textarea>
				                    <% if (check.get("content") != null ) { %>
				                    <span class="help-inline"><%=check.get("content") %></span>
				                    <% } %>
				                </div>
								
								<div class="control-group <%=check.get("captcha") != null ? "error" : "" %>">
	                                <script>
							        	var RecaptchaOptions = { theme : 'white'};
							  		</script>
									<script type="text/javascript" src="http://api.recaptcha.net/challenge?k=6LeA0c4SAAAAAMsdjrB49GPol6XImTdJM2U2AHrF"></script>
									<% if (check.get("captcha") != null ) { %>
				                    <span class="help-inline"><%=check.get("captcha") %></span>
				                    <% } %>
								</div>
								
								<br />
			                    <div class="">
			                        <button class="btn btn-primary" type="submit">Send your message</button>
			                    </div>
							</div>
						</div>
					</form>
				</div>
				
			</div>
			<div class="span4">
				<div class="adv">
					<%=AdsSystem.getAds300x600() %>
				</div>
			</div>
		</div>
		
		<br />
		
		<jsp:include page="/elements/list_domain.jsp" />

<jsp:include page="/layouts/footer.jsp" />